import Vue from 'vue'
import VueRouter from 'vue-router'
import home from './home'
import mine from './mine'
import show from './show'
import see from './see'
import shortvideo from './shortvideo'
import slectCities from './slectCities'
const originalPush = VueRouter.prototype.push

VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.use(VueRouter)

const routes = [
  ...home,
  ...mine,
  ...show,
  ...see,
  ...shortvideo,
  ...slectCities
]

const router = new VueRouter({
  routes
})

export default router
